import request from '@/utils/request.js'

export const getLeaveList = (data) => {
  return request({
    url: `/leave/${data.uid}`,
    method: 'get',
    data
  })
}

export const getLeaveDetail = (id) => {
  return request({
    url: `/leave/detail/${id}`,
    method: 'get'
  })
}

export const addLeave = (data) => {
  return request({
    url: '/leave',
    method: 'post',
    data
  })
}